{include file="header"}
<div class="x-body">
      <form class="layui-form">
	  <input type="hidden" name="model" value="dan">
      <xblock>
        <button class="layui-btn layui-btn-danger" lay-submit lay-filter="delete"><i class="layui-icon"></i>批量删除</button>
		<a class="layui-btn" onclick="x_admin_show('添加','{:url('admin/com/dan_add')}?wz={:get('wz')}')"><i class="layui-icon"></i>添加</a>
 
        <span class="x-right" style="line-height:40px">共有数据：{:fun_st('dan',array())} 条</span>
      </xblock>
      <div  style="overflow: auto;">
        <table class="layui-table" style="min-width: 1000px;">
        <colgroup>
          <col width="100">
          <col width="100">
 
          <col>
        </colgroup>
        <thead>
          <tr>
            <th>
              <input type="checkbox" name="checkAll" lay-filter="checkAll" title="全选">
            </th>
            <th>ID</th>
      			<th>链接</th>
      			<th>别名</th>
      			<th>状态</th>
            <th>操作</th>
        </tr></thead>
        <tbody>
		{volist name=":fun_s('dan',array(),'id desc',10,0)" id="vo"}
		<!--顶级-->
          <tr>
            <td>
			<input type="checkbox" name="ids[{$vo.id}]" lay-filter="checkOne" value="{$vo.id}" title="选择">
			</td>
            <td>{$vo.id}</td>
				<td>{$vo.title}</td>
				<td>
	       <a href="{:url("index/index/dan",array(alias=>$vo.alias))}" target="_blank">{$vo.alias}</a>
			</td>
			<td>
			<input type="checkbox" lay-skin="switch" url="{:url("admin/api/uindex")}?id={$vo.id}&model=dan&or=open" lay-submit lay-filter="index" value="{$vo.id}" lay-text="显示|显示"  {if condition="$vo['open'] eq 1"}checked{/if}>
			</td>
            <td class="td-manage">
			  <a class="layui-btn layui-btn-sm" onclick="x_admin_show('编辑文章','{:url('admin/com/dan_add')}?id={$vo.id}')"><i class="layui-icon"></i>编辑</a>
              <a class="layui-btn layui-btn-sm layui-btn-danger del_t" url="{:url('admin/api/catedelete')}?model=dan&id={$vo.id}" name="确定要删除这条记录吗？"><i class="layui-icon"></i>删除</a>
            </td>
          </tr>
		  {/volist}
        </tbody>
      </table>
      </div>
	  </form>
      <div class="page">
         {:fun_s('dan',array(),'id desc',10,0)->render()}
      </div>

    </div>
  {include file="footer"}